﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using ClassLibraryMessageDataType;
namespace ClassLibraryMessageDataType
{

    public class DBMessageDataType_CMD_All
    {
        /// <summary>
        /// 请求用户数据
        /// </summary>
        public const UInt16  requestUserinfo=0x0001;
    }
    #region  数据结构体
    /// <summary>
    /// 请求用户数据
    /// </summary>
    [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct DBMessageDataType_RquestUserInfo
    {
        public byte cmd;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
        public byte[] data;
    }
    /// <summary>
    /// 回复用户数据
    /// </summary>
    [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public   struct DBMessageDataType_ReturnUserInfo
    {
        public byte cmd;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
        public byte[] username;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
        public byte[] password;
    }

    #endregion


    [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct DBMessageDataType_NotifyStart2WkorkSteps
    {
        public byte cmd;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
        public byte[] IP;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4+2+2+2+2+2)]
        public byte[] time;
    }

    [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct DBMessageDataType_NotifyChangeWkorkSteps_updateWatchBoard
    {
        public byte cmd;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
        public byte[] IP;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4 + 2 + 2 + 2 + 2 + 2)]
        public byte[] time;
        public byte status;
        public byte workstepType;
    }

    public struct DBMessageDataType_NotifyChangeWkorkSteps_updateWatchBoard_for_json
    {
        public byte cmd;
        //  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
        //  public byte[] IP;
      public  List<byte> ip;// new List<byte>();
        // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4 + 2 + 2 + 2 + 2 + 2)]
        //  public byte[] time;
     public  List<byte> time;// new List<byte>();
        public byte status;
        public byte workstepType;
    }

    [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct DBMessageDataType_NotifyChangeWkorkSteps_updateAll640data
    {
        public byte cmd;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
        public byte[] IP;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4 + 2 + 2 + 2 + 2 + 2)]
        public byte[] time;
        public byte status;
        public byte workstepType;
        public OneClientAll64BoardData all640data;
    }
    public struct DBMessageDataType_NotifyChangeWkorkSteps_updateAll640data_for_json
    {
        public byte cmd;
        //  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
        //  public byte[] IP;
        public List<byte> ip;// new List<byte>();
                             // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4 + 2 + 2 + 2 + 2 + 2)]
                             //  public byte[] time;
        public List<byte> time;// new List<byte>();
        public byte status;
        public byte workstepType;
        public OneClientAll64BoardData_for_json all640data;
    }

}

